<div class="panel panel-default">
    <div class="panel-heading">
        Associated promotions
    </div>
    <div class="panel-body">
        <div class="panel panel-info" ng-repeat="branchStatusView in ontrackSvnRevisionInfo.branchStatusViews">
            <div class="panel-heading">
                Project
                <a href="#/project/{{branchStatusView.branch.project.id}}">{{branchStatusView.branch.project.name}}</a>
                Branch
                <a href="#/branch/{{branchStatusView.branch.id}}">{{branchStatusView.branch.name}}</a>
            </div>
            <table class="table">
                <thead>
                <tr>
                    <th>Promotion level</th>
                    <th>Build</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="promotionView in branchStatusView.promotions">
                    <td>
                        <a href="#/promotionLevel/{{promotionView.promotionLevel.id}}">
                            <ot-entity-image entity="promotionView.promotionLevel"></ot-entity-image>
                            {{promotionView.promotionLevel.name}}
                        </a>
                    </td>
                    <td>
                        <span class="ot-description" ng-if="!promotionView.promotionRun">
                            The revision was never promoted to this promotion level.
                        </span>
                        <span ng-if="promotionView.promotionRun">
                            <span class="fa fa-arrow-right"></span>
                            <a href="#/build/{{promotionView.promotionRun.build.id}}">
                                {{promotionView.promotionRun.build.name}}
                            </a>
                            <ot-signature value="promotionView.promotionRun.signature"></ot-signature>
                        </span>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>